var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/qf_admin',{
    useUnifiedTopology:true,
    useNewUrlParser:true
});

var db = mongoose.connection;
db.on('error', console.error.bind(console, 'connection error:'));
db.once('open', function() {
  console.log("数据库已连接")
});